<script setup lang="ts">
import HelloWorld from './components/HelloWorld.vue'
import {RouterLink,RouterView} from "vue-router"

</script>

<template>

  <header>
    <div class="wrapper">
      <HelloWorld msg="You did it!" />
    </div>
  </header>
  <div>
    <RouterLink to="/home">首页</RouterLink>
    <RouterLink to="/about?flag=true">关于</RouterLink>
    <!-- <RouterLink :to="{path:'/about',query:{flag:true}}">关于</RouterLink> -->
    <RouterLink to="/cars/5555">购物车</RouterLink>
  </div>

 <RouterView name="hhh"></RouterView>
  <RouterView></RouterView>
  <RouterView name="fff"></RouterView>
 

  
</template>

<style scoped>
/* 路由组件激活的样式 */
.router-link-active{
  background-color:#999
}

</style>
